import java.io.*;

/**
 * @author zyj
 * @date 2022年05月30日 16:25
 */
public class BufferedReaderDemo {
    public static void main(String[] args) {
        BufferedReader br = null;
        InputStreamReader isr = null;
        InputStream is = null;
        try {
            is = new FileInputStream("a.txt");
            isr = new InputStreamReader(is,"UTF-8");
            br = new BufferedReader(isr);
            String s = null;
            while ((s = br.readLine()) != null){
                System.out.println(s);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
